<!DOCTYPE html>
<html class="dj_gecko dj_contentbox"><head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Untitled Document</title>
        <link type="text/css" rel="stylesheet" href="<?php echo base_url().'assets/themes_admin/skins/'.$skin.'/'.$skin.'.css'?>">
        <link type="text/css" rel="stylesheet" href="<?php echo base_url().'assets/themes_admin/skins/'.$skin.'/Grid.css'?>">
        <link type="text/css" rel="stylesheet" href="<?php echo base_url().'assets/themes_admin/skins/'.$skin.'/icon.css'?>">
        <link type="text/css" rel="stylesheet" href="<?php echo base_url().'assets/themes_admin/skins/'.$skin.'/style.css'?>">
        <script src="http://localhost/dojo-full/dojo/dojo.js" data-dojo-config="isDebug: true,parseOnLoad: true"></script>
        <script>
            dojo.require("dijit.dijit"); // optimize: load dijit layer

            dojo.require("dijit.Toolbar");
            dojo.require("dijit.TooltipDialog");

            dojo.require("dijit.form.Button");
            dojo.require("dijit.form.Form");
            dojo.require("dijit.form.TextBox");
            dojo.require("dijit.form.SimpleTextarea");    
            dojo.require("dijit.form.ValidationTextBox");
            dojo.require("dijit.form.NumberTextBox");
            dojo.require("dijit.form.CurrencyTextBox");    
            dojo.require("dijit.form.ComboBox");     
            dojo.require("dijit.form.CheckBox");
            dojo.require("dijit.form.RadioButton");    
            dojo.require("dijit.form.DateTextBox");    
            dojo.require("dijit.ColorPalette");
            dojo.require("dijit.Calendar");	
            dojo.require("dijit.Menu");						

            dojo.require("dijit.layout.AccordionContainer");
            dojo.require("dijit.layout.TabContainer");	
            dojo.require("dijit.layout.ContentPane");
		
            dojo.require("dijit.Tree");
            dojo.require("dijit.tree.ForestStoreModel");
				
            dojo.require("dijit.Editor");
            dojo.require("dijit._editor.plugins.TabIndent");    
            dojo.require("dojo.data.ItemFileReadStore");
            dojo.require("dijit.form.FilteringSelect");
            dojo.require("dojox.grid.DataGrid");
            dojo.require("dojox.grid.cells.dijit");   	
            dojo.require("dojox.data.XmlStore");   	            
            dojo.require("dijit.form.FilteringSelect");            

            dojo.require("dojo.window");
            dojo.require("dojo.parser");

            dojo.ready(function(){
                var vs = dojo.window.getBox();
                dojo.query('.gSidebar').style({"height":(vs.h)+"px"});
            });    
        </script>

    </head>

    <body class="<?php echo $skin; ?>">                           

        <table id="bodyTable" width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="100%" width="230" class="gSidebar">
            <center>
                <div id="logo"><img src="<?php echo base_url().'assets/themes_admin/skins/'.$skin.'/images/';?>glogo.jpg"/></div>
                <!--END logo-->        
            </center>
            <br>            
            <!--MAIN NAVIGATION            -->

            <script>
                
                function getIcon(item,opened) {
                    sizeClass = 'small_icon ';
                    if ( myStore.getValue(item, "level")==1) {
                        sizeClass = 'big_icon ';
                    }
                    if (myStore.hasAttribute(item,"class")) {                                        
                        return sizeClass + myStore.getValue(item, "class");
                    } else {
                        return sizeClass + 'folder2';
                    }                
                }
                dojo.ready(function() {                
                
                    //                var store = new my.data.XmlStringStore({
                    //                    xmlstring: myxml,
                    //                    label: "description"
                    //                });
                    var myStore = new dojox.data.XmlStore({url: "<?php echo base_url()?>assets/themes_admin/sidebar_menu/sidebar_admin.xml", label: "name"});
                    var catModel = new dijit.tree.TreeStoreModel({
                        store: myStore,
                        rootId: "root",
                        rootLabel: "root",
                        childrenAttrs: ["node"]
                    });                
                    var tree = new dijit.Tree({
                        model: catModel,
                        showRoot:false,
                        getIconClass:function(item,opened) {
                            sizeClass = 'small_icon ';
                            if ( myStore.getValue(item, "level")==1) {
                                sizeClass = 'big_icon ';
                            }
                            if (myStore.hasAttribute(item,"class")) {                                        
                                return sizeClass + myStore.getValue(item, "class");
                            } else {
                                if ( myStore.getValue(item, "level")==1) {
                                    return sizeClass + 'default_big_ico';
                                } else {
                                    return sizeClass + 'default_small_ico';
                                }
                            
                            }       
                        },
                        onClick:function(item) {
                            if (myStore.hasAttribute(item,"url"))
                                window.location.href ="<?php echo base_url();?>"+myStore.getValue(item, "url");
                                //alert(myStore.getValue(item, "url"));                        
                        }
                    },
                    "mytree");                
                    //                var myStore = new dojox.data.XmlStore({url: "categories.xml", label: "name"});
                    //                var catModel = new dijit.tree.TreeStoreModel(
                    //                {
                    //                    store: myStore,
                    //                    rootId: "root",
                    //                    rootLabel: "root",
                    //                    childrenAttrs: ["category2"]
                    //                });                
                });
            </script>

            <div id="mytree"></div>      
        </div>


        <!--END MAIN NAVIGATION-->
    </td>
    <td>
        <div id="title_content"><?php if(isset ($module_title)) echo $module_title;?></div>

        <?php hook('TOOLBAR'); ?>

        <div class="gContent">
            <br/>
            <?php
            echo $template['body'];
            ?>	                      
        </div>

    </td>
</tr>
</table>






</body>
</html>
